package com.atguigu.classroom.vod.controller;

import com.atguigu.classroom.model.vod.Video;
import com.atguigu.classroom.result.Result;
import com.atguigu.classroom.vod.service.VodService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Api(tags = "视频点播接口")
@RestController
@RequestMapping("/admin/vod/")
public class VodController {
    @Autowired
    private VodService vodService;
    @ApiOperation("删除视频接口")
    @PostMapping("remove/")
    public Result upload(@RequestBody Video video){
        vodService.deleteVideo(video);
        return Result.ok(null);
    }
}
